package com.yangrd.airship.generator.page;

import com.yangrd.airship.generator.page.base.AbstractMetaInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * @author yangrd
 * @date 2021/11/8
 */
@EqualsAndHashCode(callSuper = false)
@Data
@AllArgsConstructor(staticName = "of")
@NoArgsConstructor
public class PageQueryCriteria extends AbstractMetaInfo<PageQueryCriteria> {

    private String name;

    private CriteriaType criteriaType;

    private String valResource;

    public enum CriteriaType {
        /**
         * equal
         */
        EQ,
        /**
         * not equal
         */
        NE,
        /**
         * g than
         */
        GT,
        /**
         * g equal
         */
        GE,
        /**
         * l than
         */
        LT,
        /**
         * l equal
         */
        LE,
        /**
         * between
         */
        BETWEEN,
        /**
         * like
         */
        LIKE,
        /**
         * not like
         */
        NOT_LIKE,
        /**
         * in
         */
        IN,
        /**
         * not in
         */
        NOT_IN;
    }

}
